<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page session="false"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<jsp:include page="/WEB-INF/pages/header/header.jsp" />
<div class="main-content">
	<div class="blog-holder">
		<form action="/blog/post.action" id="blogPostForm" method="post">
		<div class="blog-top-div"><span><s:text name="blog.postTitle" /></span></div>
		<div class="blog-class-topic-div">
			<span class="left-span"><s:text name="blog.postClass" /></span><span class="right-span">
				<select id="blogCategory" name="blogCategory">
				<s:iterator value="#request['category']" id="item">
					<option value="<s:property value="#item.id"/>"><s:property value="#item.category"/></option>
				</s:iterator>
				</select>
			</span>
		</div>
		<div class="blog-class-topic-div">
			<span class="left-span"><s:text name="blog.title" /></span><span class="right-span"><input type="text" id="title" name="title" required="required" placeholder="<s:text name="blog.inputTitle" />" name="topic" /></span>
		</div>
		<textarea id="blogContent" name="blogContent"></textarea>
		<div class="blog-class-topic-div"><input class="post-button" type="button" id="blogPostButton" value="<s:text name="blog.post" />" />&nbsp;<input class="post-button" type="button" value="<s:text name="blog.draft" />"/></div>
	</form>
	</div>
</div>
<script type="text/javascript">
	CKEDITOR.replace("blogContent");
	$(document).ready(function(){
		$("#blogPostButton").click(function(){
			$("#blogPostForm").submit();
		});
	});
</script>
<jsp:include page="/WEB-INF/pages/footer/footer.jsp" />